<script setup lang="ts">
import { useTodosStore } from "@/store";

const todosStore = useTodosStore();

const props = defineProps<{
  label: string;
  name: "days" | "priority" | "isFinished";
  options: Array<any>;
}>();
const realOptions = computed(() => [
  { label: "所有", value: "all" },
  ...props.options,
]);
</script>
<template>
  <div>
    <label for="">{{ label }}</label>
    <NSelect
      v-model:value="todosStore.conditions[name]"
      :options="realOptions"
    />
  </div>
</template>
